import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
    state: {
        theme: "dark",
    },
    mutations: {
        changeTheme(state, str) {
            state.theme = str;
        },
    },
    actions: {
        themeAction(context, str) {
            context.commit("changeTheme", str);
        },
    },
    getters: {
        theme(state) {
            return state.theme;
        },
    },
    modules: {},
});
